/*
 * testing endturn function
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int main(int argc, char **argv)
{

	struct gameState G;
	int i,idx,game1;
	int indicator=0;
	int k[10] = {adventurer, council_room, feast, gardens, mine,
	       remodel, smithy, village, baron, great_hall};
	int players=4;
	i=-1;
	game1 = initializeGame(players, k, 1, &G);
		while(idx<100){
		if(i==whoseTurn(&G)){
			printf("at test number %d, end turn end turn failed!!", idx-1);
			indicator++;
		}		
		i=whoseTurn(&G);
		printf("Player: %d playing currently", whoseTurn(&G));
		printf("ending current turn: %d(0 = success 1=failed)\n",endTurn(&G));
		idx++;
		}

	if(indicator==0){
		printf("endturn function test pass!\n\n");
	}

	return 0;
}
